﻿<%@ Page Language="C#" MasterPageFile="~/Deparment/Mother/MasterPageShow.master" AutoEventWireup="true" CodeFile="Files_Update.aspx.cs" Inherits="Deparment_Filse_Files_Update" Title="Untitled Page" validateRequest="false" %>
<%@ Register Assembly="FreeTextBox" Namespace="FreeTextBoxControls" TagPrefix="FTB" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Agency" Runat="Server">
<script language="javascript" type="text/javascript">
        function CheckValue(objTitleID,objContentID,send)
        {
            txttitle=document.getElementById(objTitleID).value;
            txtcontent=document.getElementById(objContentID).value;
            if(txttitle=="")
            {
                alert("标题不能为空!");
                return false;
            }
            if(txtcontent=="")
            {
                alert("信息内容不能为空!");
                return false;
            }
            if(send==2)
            {  
              if(document.getElementById("textsend").value=="")
              {
                alert("发送人不能为空!");
                return false;
              }
            }
        }
         function Sel()
        {
    
            window.open('SelectSend.aspx');
        }
        function confirmvalue(obj)
        { 
           //alert(obj.Accountid);
           //alert(obj.dwname);
           document.all('HiddenSend').value = obj.Accountid;
           document.all('textsend').value= obj.dwname;
               
        }
         function listFileUpLoad(objfjID)
        {
           objFJ=document.getElementById(objfjID);
           dltype=objFJ.style.display;
           
           fjControl=document.getElementById('isReUpLoad');
           objButton=document.getElementById("ReUpLoad");
           
           
           /*dd=objFJ.attributes.getNamedItem("value").value;
           alert(dd);*/
           if(dltype=="block")
           {
               objFJ.style.display="none";
               objButton.value="重新上传"
               fjControl.value="0";
               
           }else
           {
               objFJ.style.display="block";
               objButton.value="取消上传"
               fjControl.value="1";
           }
        }
    </script>
 <div style="text-align:center;">
            <table id="tabData" width="98%" border="0" align="center" cellpadding="2" cellspacing="1"
                class="table_table2">
                <tr>
                    <td class="table_td3">
                        标题：</td>
                    <td class="table_td2" align="left">
                        <asp:TextBox id="txtName" runat="server" Width="400px"/>
                        <span style="color: #ff0000">(*)</span></td>
                </tr>
                <tr>
                    <td class="table_td3" style="height: 371px">
                        内容：</td>
                    <td class="table_td2" style="height: 371px">
                        <div style="width: 100%; table-layout: fixed; text-align: left;">
                            <FTB:FreeTextBox ID="txtContent" runat="server">
                            </FTB:FreeTextBox>
                            <span style="color: #ff0000">(*)</span></div>
                    </td>
                </tr>
                <tr id="fj" style=" display:none;">
                    <td class="table_td3" style="height: 28px">
                        上传附件：</td>
                    <td class="table_td2" style="height: 28px" align="left">
                        <asp:FileUpload ID="FileUpload1"  runat="server" unselectable="on"  Width="604px" /></td>
                </tr>
                <tr>
                    <td class="table_td3" style="height: 28px">
                        下载附件：</td>
                    <td class="table_td2" style="height: 28px" align="left">
                        <asp:label id="txtfj" runat="server"  Width="400px"/></td>
                </tr>
                <tr>
                    <td class="table_td3" style="height: 28px">
                        发送</td>
                    <td class="table_td2" style="height: 28px" align="left">
                        <input id="textsend" name="textsend" type="text" unselectable="on" />
                        <input id="Submit1" class="button_bg6" name="btnSubmit" onclick="Sel()" style="width: 72px"
                            type="button" value="选择发送人" />
                        <input id="HiddenSend" name="HiddenSend" type="hidden" /></td>
                </tr>
                <tr>
                    <td class="table_td3">
                        <input type="submit" name="btnSubmit" id="btnSubmit" value="保  存" class="button_bg"
                            onclick="javascript:return CheckValue('txtName','<%=txtContent.ClientID %>',1)" />
                    </td>
                    <td class="table_td2">
                        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
                        <input id="Submit2" class="button_bg6" name="btnSubmit2" onclick="javascript:return CheckValue('txtName','<%=txtContent.ClientID %>',2)"
                            style="width: 70px" type="submit" value="发 送" />
                        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                        <input id="Button2" class="button_bg" type="button" value="关  闭" onclick="window.close()" /><asp:HiddenField
                            ID="HiddenField1" runat="server" />
                    </td>
                </tr>
            </table>
        </div>
</asp:Content>

